package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.service.OpenfeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {

    @Resource
    private OpenfeignService openfeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult paymentOrder(@PathVariable("id") Integer id){

        CommonResult payment = openfeignService.getPayment(id);

        return payment;
    }
}
